using System;
using System.Diagnostics.Contracts;

namespace Charisma
{
    [ContractClass(typeof (IRepositoryContract))]
    public interface IRepository
    {
        Type ElementType { get; }
    }

    [ContractClassFor(typeof (IRepository))]
    internal abstract class IRepositoryContract : IRepository
    {
        #region IRepository Members

        public Type ElementType
        {
            get
            {
                Contract.Ensures(Contract.Result<Type>() != null);
                return null;
            }
        }

        #endregion
    }
}